<template>
  <!--      :getPopupContainer="triggerNode => triggerNode.parentNode"-->
    <a-select
      :disabled="diasbled"
      :mode="mode"
      allow-clear>
      <a-select-option
        v-for="item in dictData"
        :key="item.dictName"
        :value="item.dictName">{{ item.dictName }}
      </a-select-option>
    </a-select>

</template>

<script>
import mtUtil from "@/utils/mtUtil";

export default {
  name: "MDictSelect",
  props: {
    dict: String,
    dictList: {
      type: Array,
      default: ()=>{
        return [];
      }
    },
    diasbled:{
      type:Boolean,
      default:false
    },
    mode:{
      type:String,
      default:""
    }
  },
  data() {
    return {
      placeholder: '请选择' + this.dict,
      dictData: []
    }
  },
  mounted() {
    if(this.dictList.length!==0){
      this.dictData = this.dictList
    }else{
      this.dictData = mtUtil.getDict(this.dict);
      console.log(this.dictData)
    }
  },

}
</script>

<style scoped>

</style>
